<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex</title>
    <style>
        .box {
            /* 1. 开启flex布局：flex：块级元素; inline-flex：行内元素 (这个)*/
            display: flex;
            /* display: inline-flex; */
            width: 500px;
            height: 150px;
            background-color: orange;
        }

        .item {
            width: 100px;
            height: 100px;
            color: #fff;
        }

        .item1 {
            background-color: #f00;
        }

        .item2 {
            background-color: #0f0;
        }

        .item3 {
            background-color: #00f;

        }
    </style>
</head>

<body>
    <div class="box">
        <div class="item item1">左</div>
        <div class="item item2">中</div>
        <div class="item item3">右</div>
    </div>
    <strong>使用inline-flex，div 会和 strong 在一行</strong>
</body>

</html>